/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.foxinline.servico;

import br.com.foxinline.modelo.Endereco;
import br.com.foxinline.util.Caracter;
import javax.ejb.EJB;
import javax.ejb.Stateless;

/**
 *
 * @author laverson
 */
@Stateless
public class EnderecoServico extends ServicoGenerico<Endereco> {

    @EJB
    BancoServico bancoServico;

    public EnderecoServico() {
        super(Endereco.class);
    }

    @Override
    public void salvar(Endereco entity) {
        entity.setCep(Caracter.removecaracter(entity.getCep()));
        super.salvar(entity);
    }

    @Override
    public void atualizar(Endereco entity) {
        entity.setCep(Caracter.removecaracter(entity.getCep()));
        super.atualizar(entity);
    }
}
